Here we have a Channel set up via Channel(4), so it has a four-element buffer.

This time, we use delay() on our receive logic. We try using send() five times, and the first four are processed immediately, but the fifth suspends, because we have run out of buffer space. Only after we start to consume objects from the channel can our fifth send() complete.

You can learn more about this in:
Tags:
Run Edit